<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate12 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('order_skus', function (Blueprint $table) {
            $table->boolean('is_hidden_sku')->nullable()->index()->comment('是否是隐藏款');
            // $table->integer('user_id')->nullable()->comment('用户id');
        });

        Schema::table('boxes', function (Blueprint $table) {
            $table->boolean('is_hidden_sku_rank')->nullable()->comment('是否显示隐藏款榜单');
            $table->boolean('is_normal_sku_rank')->nullable()->comment('是否是隐藏款');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('order_skus', function (Blueprint $table) {
            $table->dropColumn('is_hidden_sku');
            // $table->dropColumn('user_id');
        });

        Schema::table('boxes', function (Blueprint $table) {
            $table->dropColumn('is_hidden_sku_rank');
            $table->dropColumn('is_normal_sku_rank');
        });
    }
}
